import { createPinia } from 'pinia'
import persistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(persistedstate)
export default pinia
export * from './user'

//  vuex: vuex-persistedstate 持久化
// pinia :pinia-plugin-persistedstate
/*
pinia-plugin-persistedstate
1:下载安装
  npm i pinia-plugin-persistedstate
2:在store/indes.ts内导入
  import persistedstate from 'pinia-plugin-persistedstate'
  const pinia = createPinia()
  pinia.use(persistedstate)
3:配制模块
   {
    persist: true   // 全部数据持久化
    // 或者：persist:{paths:['testNum']}  // 只是testNum持久化
    }



*/
